<template>
    <div>
       <h3>报销人：{{moneyInfo.name}}</h3> 
       <h3>报销类型：{{moneyInfo.type}}</h3> 
       <h3>报销金额：{{moneyInfo.money}}</h3> 
       <h3>报销状态：{{moneyInfo.name}}</h3> 
       <h3>报销日期：{{moneyInfo.date}}</h3> 
    </div>
</template>

<script>
    export default {
        data(){
            return {
                moneyInfo:{}
            }
        },
        props:["num"],
        
        methods:{
            add(){
                this.$message("添加成功")
                this.$emit("close")
            },
            getInfo(){
                let data = this.$store.state.money.moneyList.userData
                let res = data.find(item => item.num === this.num - 0)
                this.moneyInfo = res
            }
        },
        watch:{
            num:{
                immediate:true,
                handler(newVal){
                    this.getInfo()
                }
            }
        },
    }
</script>

<style lang="scss" scoped>

</style>